package com.cg.controller;


import com.cg.entity.CgCommunicationUser;
import com.cg.service.ICgCommunicationUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zc
 * @since 2020-11-25
 */
@RestController
@RequestMapping("/cg/user")
public class CgCommunicationUserController {

    @Autowired
    ICgCommunicationUserService iCgCommunicationUserService;

    //@CrossOrigin(origins = {""})1
    @GetMapping("queryUser")
    public List<CgCommunicationUser> query(){
        System.out.println("1");
        List<CgCommunicationUser> communicationUsers  = iCgCommunicationUserService.queryAll();
        return communicationUsers;
    }
}
